#include<stdio.h>

int main()
{
	int fac=1,sum=0,n,flag,sign;
	scanf("%d",&n);
	for(sign=1;sign<=n;sign++){
		fac*=sign;
		sum+=fac;
	}
	printf("%d %d %d",n,fac,sum);
	return 0;
}
